<script setup>
import HomeCategory from '@/views/Home/components/HomeCategory.vue'
import HomeBanner from '@/views/Home/components/HomeBanner.vue'
// import HomeNew from '@/views/Home/components/HomeNew.vue'
// import HomeHot from '@/views/Home/components/HomeHot.vue'
import HomeProduct from '@/views/Home/components/HomeProduct.vue'
import { getAllProduct } from '@/apis/category'
import { onMounted } from 'vue'
const getAll = async () => {
  try {
    const res = await getAllProduct()
    console.log('Products:', res) // 根据需要使用数据
  } catch (error) {
    console.error('Failed to fetch products:', error)
  }
}
onMounted(() => {
  getAll()
})
</script>
<template>
  <div class="container">
    <HomeCategory></HomeCategory>
    <HomeBanner></HomeBanner>
  </div>
  <!-- <HomeNew></HomeNew> -->
  <!-- <HomeHot></HomeHot> -->
  <HomeProduct></HomeProduct>
</template>
